package com.alm.handle.util;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class LableErrerUtil {
    private static Map<Integer,String> map =new HashMap<Integer,String>();
    static {
        map.put(0x07,"当前包数部位第一包！");
        map.put(0x21,"适配器扫描不到设备！");
        map.put(0x08,"图片包含不支持的颜色图层！");
        map.put(0x09,"X坐标越界！");
        map.put(0x0a,"Y坐标越界！");
        map.put(0x0b,"图片宽度越界！");
        map.put(0x0c,"图片高度越界！");
        map.put(0x0d,"图片宽度不是8的整数倍！");
        map.put(0x0e,"Flash剩余内存不足！");
        map.put(0x0f,"没有对应的图片代码！");
        map.put(0x10,"非图片类型的命令！");
        map.put(0,"数据包发送失败！");
        map.put(2,"发送超时！");
    }
    public static Boolean isErrer(Integer key){
        Set <Integer> set=map.keySet();
        return set.contains(key);
    }
    public static String getErrer(Integer key){

        return map.get(key);
    }
}
